package com.lc.guessTheWords.util;

import com.wiyun.engine.actions.ease.EaseAction;
import com.wiyun.engine.actions.ease.EaseBounceIn;
import com.wiyun.engine.nodes.Director;
import com.wiyun.engine.nodes.Scene;
import com.wiyun.engine.transitions.BottomSlideInTransition;
import com.wiyun.engine.transitions.ColorFadeTransition;
import com.wiyun.engine.transitions.FlipXTransition;
import com.wiyun.engine.transitions.TopSlideInTransition;
import com.wiyun.engine.types.WYColor3B;

public class GameUtil {

	public static void switchSceneFlipX(Scene toScene) {
		Scene scene = FlipXTransition.make(0.5f, toScene, false);
		Director.getInstance().replaceScene(scene);
	}

	public static void switchSceneNormal(Scene toScene) {
		Scene scene = ColorFadeTransition.make(1.5f, toScene, new WYColor3B(
				200, 200, 200));
		Director.getInstance().replaceScene(scene);
	}

	public static void switchSceneBottomSlide(Scene toScene) {
		BottomSlideInTransition trans = BottomSlideInTransition.make(1.2f,
				toScene);
		trans.autoRelease();
		EaseAction ease = EaseBounceIn.make();
		ease.autoRelease();
		trans.setInEaseAction(ease);
		Director.getInstance().replaceScene(trans);
	}

	public static void switchSceneTopSlide(Scene toScene) {
		TopSlideInTransition trans = TopSlideInTransition.make(1.2f, toScene);
		trans.autoRelease();
		EaseAction ease = EaseBounceIn.make();
		ease.autoRelease();
		trans.setInEaseAction(ease);
		Director.getInstance().replaceScene(trans);
	}
}
